package com.dylan.redislimiting.exception;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * 全局异常处理
 *
 * @author zhangshaojian
 * @date 2022/7/22 18:34
 */
@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler
    public String runtimeHandler(RuntimeException ex) {
        return "发生异常了=====" + ex.getMessage();
    }
}
